<template>
	<div class="bigDiv">
		<div style="margin: 10px auto 30px 40px;font-size: 25px;color: #004c70;font-weight: bold;">
			PSCS各组织订单统计(有效订单不含预占 单位/元)
		</div>
		<el-table :data="list" border :cell-style="setRowStyle" :header-cell-style="{fontSize:'15px',background:'#daf3ff',height:'70px',color:'#000000',border: '0.3px solid #afe1e1'}" height="calc(100vh - 220px)" >
			<el-table-column label="pscs订单" align="center" prop="date" margin: auto></el-table-column>
			<el-table-column label="本钢" align="center" prop="本钢" margin: auto></el-table-column>
			<el-table-column label="攀钢" align="center" prop="攀钢" margin: auto></el-table-column>
			<el-table-column label="鞍钢股份" align="center" prop="鞍钢" margin: auto></el-table-column>
			<el-table-column label="合计" align="center" prop="sum2" margin: auto></el-table-column>
		</el-table>
	</div>
</template>

<script>
	import {
		getPscsBuyCount
	} from "@/api/leader/leaderapi";
	export default {
		name: "",
		// 页面数据
		data() {
			return {
				list: [],
				total: 0, // 一共多少条数据
				timeModel: []
			};
		},
		// 初始化
		mounted() {
			this.getDate();
			console.log('60',this.list);
		},
		// 函数集合
		methods: {
			getDate() {
				//本年商品类别销售金额
				getPscsBuyCount().then(res => {
					this.list = res
					console.log('67',this.list);
					})   
			},
			//不同列显示颜色
			setRowStyle({row, column, rowIndex, columnIndex}) {
			   if(columnIndex == 0){
			       return 'background: #f4ffff' 
			   }
			   if(columnIndex == 4){
			       return 'background: #ff625d' 
			   }
			},
			
			setRowStyle2({row, column, rowIndex, columnIndex}) {
			   if(columnIndex == 0){
			       return 'background: #e9ffe5' 
			   }
			}

		}
	}
</script>

<style>
	::v-deep.el-table td {
	  border: 1px solid black;
	  border-right: none !important;
	}
</style>
